From d46dd79904bf6ac05570d24bd11166d6b1043889 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Tue, 12 Jun 2007 14:06:37 +0100 Subject: [PATCH] x86: Initialise %ds when booting APs, otherwise data accesses go to the wrong place. Signed-off-by: Kevin Tian Signed-off-by: Keir Fraser --- xen/arch/x86/boot/trampoline.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index 492d42aaab..b76a25a3e7 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -6,11 +6,13 @@ .globl trampoline_realmode_entry trampoline_realmode_entry: + mov %cs,%ax + mov %ax,%ds movb $0xA5,bootsym(trampoline_cpu_started) cld cli - lidt %cs:bootsym(idt_48) - lgdt %cs:bootsym(gdt_48) + lidt bootsym(idt_48) + lgdt bootsym(gdt_48) xor %ax, %ax inc %ax lmsw %ax # CR0.PE = 1 (enter protected mode) -- 2.30.2